package hu.plusone.eregister.entity;

import java.util.Date;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

@Document(collection = "eregister_diary")
public class Diary {

    @Id
    private String id;
    private Child child;
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private Date lastEdited;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Child getChild() {
        return child;
    }

    public void setChild(Child child) {
        this.child = child;
    }

    public Date getLastEdited() {
        return lastEdited;
    }

    public void setLastEdited(Date lastEdited) {
        this.lastEdited = lastEdited;
    }

    @Override
    public String toString() {
        return "Diary{" + "id=" + id + ", child=" + child + ", lastEdited=" + lastEdited + '}';
    }

}
